// src/App.tsx
import 'react-native-gesture-handler';
import React, { useEffect } from 'react';
import { Provider } from 'react-redux';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import Toast from 'react-native-toast-message';
import { store } from './src/store/store';
import AppNavigator from './src/navigation/AppNavigator';
import { initializeApp } from './src/utils/initialization';
import { NavigationContainer } from '@react-navigation/native';

const App: React.FC = () => {
    useEffect(() => {
        initializeApp({
            skipNotifications: true,
            skipBilling: true,
            skipWebSocket: true,
            skipAuth: false,
        });
    }, []);

    return (
        <Provider store={store}>
            <SafeAreaProvider>
                <NavigationContainer>
                    <AppNavigator />
                </NavigationContainer>
                <Toast />
            </SafeAreaProvider>
        </Provider>
    );
};

export default App;